﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data; 
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using MKIB3Game;
using System.Threading;
using System.Diagnostics;

namespace GuiConny
{
    class Programm
    { 
        [System.STAThreadAttribute()]
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]       
        public static void Main(string[] args){



            //ProcessStartInfo ps = new ProcessStartInfo(@"E:\Program Files\Java\jre7\bin\java.exe", @"-jar E:\Users\Conny\Dropbox\Texte_(Laptop-Sync-25)\Studium MKINF\mkib3_Inf3\praktikum\local_server.jar");
            //Process.Start(ps);

            MyMainWindow window = null;
            Window w = new Window();
           
            GuiConny.App app = new GuiConny.App(); 
            app.InitializeComponent();
            app.Run();
            //if (app.MainWindow is MyMainWindow)
            //{
            //    Console.WriteLine("es tut!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !");
            //    window = (MyMainWindow)app.MainWindow;
            //}
            while (true)
            {
                String s = Console.ReadLine();
                if (window != null)
                {
                    window.backend.sendServerMessage(s);
                }
              
                ;
            }
  
         }
 
         
    }
}
